package org.sort;

public class BubbleSort {

    double[] bubbleSort(double a[]){
        double[] arr=a;
        for(int i=0;i<arr.length-1;i++){
            for(int j=0;j<arr.length-1-i;j++){
                if(arr[j]>arr[j+1]){
                    double tmp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=tmp;
                }
            }
        }
        System.out.println("Bubble");
        for (int i=0; i<arr.length-1;i++)
            System.out.print(a[i]+"  ");
        return  arr;
    }

}
